﻿using System;
class Task1
{
    public int maxnum(int[] a)
    {
        int max = a[0];
        foreach(int i in a)
        {
            if (i > max) max = i;
        }
        return max;
    }
    public int minnum(int[] a)
    {
        int min = a[0];
        foreach (int i in a)
        {
            if (i < min) min = i;
        }
        return min;
    }
    public int sumup(int[] a)
    {
        int sum = 0;
        foreach (int i in a)
        {
            sum += i;
        }
        return sum;
    }
    public int average(int[] a)
    {
        return sumup(a) / a.Length;
    }
}
class Test
 {
    static void Main(string[] args)
    {
        Task1 task1 = new Task1();
        int[] a = { 1, 2, 3, 4, 5, 6, 7 };
        Console.WriteLine(task1.maxnum(a));
        Console.WriteLine(task1.minnum(a));
        Console.WriteLine(task1.sumup(a));
        Console.WriteLine(task1.average(a));
    }
 }
